package cn.brilliantfuture.commentry.entity;

// Generated 2011-12-9 18:03:45 by Hibernate Tools 3.3.0.GA

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.validator.Length;

/**
 * SmsInfo generated by hbm2java
 */
@Entity
@Table(name = "sms_info", catalog = "cabinet")
public class SmsInfo implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer smsInfoId;
	private LanguageInfo languageInfo;
	private Integer smsUse;
	private Integer applyOrient;
	private String smsContent;
	private Date insertTime;
	private Integer insertUser;
	private boolean deleted;

	public SmsInfo() {
	}

	public SmsInfo(boolean deleted) {
		this.deleted = deleted;
	}

	public SmsInfo(LanguageInfo languageInfo, Integer smsUse, Integer applyOrient, String smsContent,
			Date insertTime, Integer insertUser, boolean deleted) {
		this.languageInfo = languageInfo;
		this.smsUse = smsUse;
		this.applyOrient = applyOrient;
		this.smsContent = smsContent;
		this.insertTime = insertTime;
		this.insertUser = insertUser;
		this.deleted = deleted;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "sms_info_id", unique = true, nullable = false)
	public Integer getSmsInfoId() {
		return this.smsInfoId;
	}

	public void setSmsInfoId(Integer smsInfoId) {
		this.smsInfoId = smsInfoId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "language_info_id", nullable = false)
	public LanguageInfo getLanguageInfo() {
		return this.languageInfo;
	}

	public void setLanguageInfo(LanguageInfo languageInfo) {
		this.languageInfo = languageInfo;
	}

	@Column(name = "sms_use", nullable = false)
	public Integer getSmsUse() {
		return this.smsUse;
	}

	public void setSmsUse(Integer smsUse) {
		this.smsUse = smsUse;
	}

	@Column(name = "sms_content", length = 200, nullable = false)
	@Length(max = 200)
	public String getSmsContent() {
		return this.smsContent;
	}

	public void setSmsContent(String smsContent) {
		this.smsContent = smsContent;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "insert_time", length = 19, nullable = false)
	public Date getInsertTime() {
		return this.insertTime;
	}

	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

	@Column(name = "insert_user", nullable = false)
	public Integer getInsertUser() {
		return this.insertUser;
	}

	public void setInsertUser(Integer insertUser) {
		this.insertUser = insertUser;
	}

	@Column(name = "deleted", nullable = false)
	public boolean isDeleted() {
		return this.deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	@Column(name = "apply_orient", nullable = false)
	public Integer getApplyOrient() {
		return applyOrient;
	}

	public void setApplyOrient(Integer applyOrient) {
		this.applyOrient = applyOrient;
	}

}
